places view: Disconnect from volume monitor
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jul 2015 01:19:58 +0000 (21:19 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jul 2015 01:23:06 +0000 (21:23 -0400)
Just unreffing the volume monitor object won't stop it from emitting
signals that we are connected to. Disconnect from the signals in
finalize.

gtk/gtkplacesview.c

index dfd882bbffd482d0e2cdbbe28c668feb2a8eb72e..94ab0ee993aa149bbd0e1752191f898fa77e9db3 100644 (file)
@@ -368,12 +368,16 @@ activate_row (GtkPlacesView      *view,
     }
 }
 
+static void update_places (GtkPlacesView *view);
+
 static void
 gtk_places_view_finalize (GObject *object)
 {
   GtkPlacesView *self = (GtkPlacesView *)object;
   GtkPlacesViewPrivate *priv = gtk_places_view_get_instance_private (self);
 
+  g_signal_handlers_disconnect_by_func (priv->volume_monitor, update_places, object);
+
   if (priv->entry_pulse_timeout_id > 0)
     g_source_remove (priv->entry_pulse_timeout_id);